<template>
  <div class="no-content">
    <img class="no-content-img" :src="imgs[type]"/><br/>
    <span class="no-content-text">{{text}}</span>
  </div>
</template>

<script>
import noContent from 'assets/common_images/nocontent.png'
import noCar from 'assets/common_images/nocar.png'
import noJoin from 'assets/common_images/nojoin.png'
import noBuild from 'assets/common_images/nobuild.png'

const imgs = {
  noContent,
  noCar,
  noJoin,
  noBuild
}

export default {

  name: 'NoContent',

  data() {
    return {
      imgs
    };
  },
  props: {
    type: {
      type: String,
      default: 'noContent'
    },
    text: {
      type: String,
      default: '暂无数据'
    }
  }
};
</script>

<style lang="css" scoped>
.no-content{
  margin: auto;
  text-align: center;
}
.no-content-text{
  color: #999;
}
</style>
